package javabase.schoolwork.day6_6;

/**
 * @author fance
 * @date 18-6-6 下午3:35
 */
interface Print {
    String getColor();
}
public enum Color implements Print{
    RED("red") {
        @Override
        public String fun() {
            return ".";
        }

        @Override
        public String getColor() {
            return "ppp";
        }
    },GREEN("green") {
        @Override
        public String fun() {
            return "?";
        }

        @Override
        public String getColor() {
            return "333";
        }
    },BLUE("blue") {
        @Override
        public String fun() {
            return "e";
        }

        @Override
        public String getColor() {
            return "ddd";
        }
    };
    private String name;

    Color(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public abstract String fun();
}
